/**
 *
 */
package messaage;

import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;

/**
 * @author mariak
 *
 */
public class AddFriendMsg extends Message {

	protected String nameOfFriend;
	protected String username;

	/**
	 *
	 */
	public AddFriendMsg(String username, String friendName) {
		this.username = username;
		this.nameOfFriend = friendName;
		this.type = "AddFriendMsg";
	}

	/**
	 * @return the nameOfFriend
	 */
	public String getNameOfFriend() {
		return nameOfFriend;
	}
	public String getUsername() {
		return this.username;
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see messaage.Message#toString()
	 */
	@Override
	public String toString() {
		XStream xstream = new XStream(new DomDriver());
		String xml = xstream.toXML(this)+"\0";
		
		return xml;
	}

}
